package com.cloudbroker.bcs.platform.ltb.middle.service.impl;

import com.cloudbroker.bcs.common.dao.base.DAOBase;
import com.cloudbroker.bcs.platform.ltb.bizapi.service.viewpoint.vo.ViewpointAdminQueryForm;
import com.cloudbroker.bcs.platform.ltb.bizapi.service.viewpoint.vo.ViewpointRecomQueryForm;
import com.cloudbroker.bcs.platform.ltb.middle.dao.ViewpointRecomDAO;
import com.cloudbroker.bcs.platform.ltb.middle.entity.ViewpointMsg;
import com.cloudbroker.bcs.platform.ltb.middle.entity.ViewpointRecom;
import com.cloudbroker.bcs.platform.ltb.middle.entityview.ViewpointAdminView;
import com.cloudbroker.bcs.platform.ltb.middle.service.ViewpointRecomService;
import com.cloudbroker.bcs.platform.ltb.middle.service.base.TenantServiceImplBase;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by world on 16/7/8.
 */
@Service
public class ViewpointRecomServiceImpl extends TenantServiceImplBase<ViewpointRecom, String>
    implements ViewpointRecomService {

    @Resource
    private ViewpointRecomDAO viewpointRecomDAO;

    @Override
    protected DAOBase<ViewpointRecom, String> getDAO() {
        return viewpointRecomDAO;
    }

    @Override
    public List<ViewpointMsg> queryViewpointRecomList(ViewpointRecomQueryForm viewpointRecomQueryForm) {
        return viewpointRecomDAO.queryViewpointRecomList(viewpointRecomQueryForm);
    }

    @Override
    public void deleteByViewpoint(ViewpointRecom viewpointRecom) {
        viewpointRecomDAO.deleteByViewpoint(viewpointRecom);
        return;
    }

    @Override
    public List<ViewpointAdminView> queryAdminViewpoint(ViewpointAdminQueryForm viewpointAdminQueryForm) {
        return viewpointRecomDAO.queryAdminViewpoint(viewpointAdminQueryForm);
    }

    @Override
    public Integer countAdminViewpoint(ViewpointAdminQueryForm viewpointAdminQueryForm){
        return viewpointRecomDAO.countAdminViewpoint(viewpointAdminQueryForm);
    }
}
